function selecteditem = uicontrol_SelectedItem( varargin )
%UICONTROL_SELECTEDITEM Summary of this function goes here
%   Detailed explanation goes here

h= varargin{1};
switch nargin 
    case 1        
        index= get(h, 'value');
        items= get(h, 'string');
        selecteditem= items{index};
    case 2
        item2select= varargin{2};
        items= get(h, 'string');
        for i= 1:numel(items)
            if length(items{i}) == length(item2select)
                if strcmp(items{i}, item2select)
                    set(h, 'value', i);
                    return
                end
            end
        end
end

